#ifndef _BUTTON_MANAGER_H_
# define _BUTTON_MANAGER_H_

# include "AButton.h"
# include <vector>

class ButtonManager
{
private:
	static ButtonManager& m_instance;
	std::vector<AButton*> m_buttons;

private:
	ButtonManager();
	~ButtonManager();

public:
	static ButtonManager& Instance();
	std::vector<AButton*> const& getButtons() const;

	void addButton(AButton* _button);
	void clearButtons();

	// return false if screen has changed
	bool update();
	bool draw(SDL_Surface* _screen);

public:
	__declspec(property(get=getButtons))std::vector<AButton*> Buttons;

private:
	void updateButtonEvent(AButton* _button);

private:
	ButtonManager(ButtonManager const&);
	ButtonManager& operator=(ButtonManager const&);
};

#endif // _BUTTON_MANAGER_H_
